<%@ page language="java" import="java.util.*,office.BusiUtil" pageEncoding="UTF-8"%>
<%@include file="/common/jsp/taglibs-nojs-nocss.jsp"%>
<%@ page isELIgnored="false" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<div id="pop_up_content">
	<div class="pop_up_title images_13">
		<s:if test="departmentVo.type=='group'">
			编辑集团信息
		</s:if>
		<s:elseif test="departmentVo.type=='ccompany'">
			编辑子公司信息
		</s:elseif>
		<s:elseif test="departmentVo.type=='department'">
			编辑子部门信息
		</s:elseif>
	</div>
	<div class="pop_up_body">
		<form id="thisForm" action="saveDepartment.action" method="post" >
		<table border="0" cellpadding="0" cellspacing="0"  width="400">
			<tr>
				<td>
					<div class="form_input_value">
						<s:if test="departmentVo.type=='group'">
							集团名称
						</s:if>
						<s:elseif test="departmentVo.type=='ccompany'">
							子公司名称
						</s:elseif>
						<s:elseif test="departmentVo.type=='department'">
							部门名称
						</s:elseif>
					</div>
				</td>
				<td>
					<input type="hidden" name="departmentVo.id" value="<s:property value='departmentVo.id'/>" >
					<input type="hidden" name="departmentVo.parentId" value="<s:property value='departmentVo.parentId'/>" >
					<input type="hidden" name="departmentVo.type" value="<s:property value='departmentVo.type'/>" >
					<input type="text" id="name" name="departmentVo.name" value="<s:property value='departmentVo.name'/>" >
				</td>
			</tr>
			<tr>
				<td>
					<div class="form_input_value">
						<s:if test="departmentVo.type=='group'">
							集团备注
						</s:if>
						<s:elseif test="departmentVo.type=='ccompany'">
							子公司备注
						</s:elseif>
						<s:elseif test="departmentVo.type=='department'">
							部门备注
						</s:elseif>
					</div>
				</td>
				<td>
					<input type="text" id="memo" name="departmentVo.memo" value="<s:property value='departmentVo.memo'/>" class="longinput required" >
				</td>
			</tr>
			<tr>
				<td>
					<input id="thisButton" type="button" value="提交" class="btn" onmouseout="this.className='btn'" onmousedown="this.className='btn1'" onmouseover="this.className='btn2'">
					<input type="button" value="取消" class="btn" onclick="hideDialog();" onmouseout="this.className='btn'" onmousedown="this.className='btn1'" onmouseover="this.className='btn2'">
				</td>
			</tr>
		</table>
		</form>
	</div>
</div>
<script>
	
	/* 表单提交 */
	i.formSubmit("thisButton",	//绑定的按钮id
					  "thisForm" ,   //提交的表单id
					  function(result){
						  	var jsonMsgObj=new JsonMsgObj(result);
							var  msg=jsonMsgObj.getMessage();
						    var codeId=jsonMsgObj.getCodeid();
							var isOk=jsonMsgObj.getIsok();
							if( isOk ){
							    aerouiAlert(msg);
								hideDialog();// 隐藏窗口
								window.location.reload();
							}else{		// 如果编辑失败了
							  JsManageInfoHandleException( result , function(msg , codeId , isOk){
							  		hideDialog();// 隐藏窗口
							   });
						   }
						});
</script>